<?php
include_once 'BaseS.php';
include_once 'BaseM.php';

class TruncateTableS extends BaseS {

	public function __construct() {
		parent::__construct ();
		parent::setTarget ( $this );
	}

	public function truncateMember(){
		$dao = new TruncateTableM();
		$dao->truncateMember();
		echo 1;
	}
	
	public function updateLastBMTime(){
		$dao = new TruncateTableM();
		$dao->updateLastBMTime();
		echo 1;
	}

}

class TruncateTableM extends BaseM{

	public function __construct() {
		parent::__construct ();
	}

	public function truncateMember(){
		$sql = "truncate member";
		return $this->querySQL($sql);
	}
	
	public function updateLastBMTime(){
		$sql = "update member set last_bm_time = '0000-00-00' ";
		return $this->querySQL($sql);
	}
		
}



if (isset($_GET["action"])) {
	$service = new TruncateTableS ();
	$service->__call ( $_GET["action"], null );
}

?>